import {
  AsyncStorage,
} from 'react-native';

export default class ThemeDao{
  getData(){
      return new Promise((resolve,reject)=>{
          AsyncStorage.getItem('theme',(error,result)=>{
              if(error){
                  reject(error);
                  return;
              }
              if (!result){
                  resolve('');
              }else {
                try {
                    resolve(result);
                } catch (e) {
                    reject(error);
                }
                
              }
          });
      });
  }
  saveData(theme){
      AsyncStorage.setItem('theme',theme,(error,result)=>{

      });
  }
  // data, time
}